\hypertarget{classUDPServer}{
\section{UDPServer Class Reference}
\label{classUDPServer}\index{UDPServer@{UDPServer}}
}
Inheritance diagram for UDPServer::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3cm]{classUDPServer}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
\hypertarget{classUDPServer_5f9126e71c6938ff1d0794ebcb579a8e}{
\hyperlink{classUDPServer_5f9126e71c6938ff1d0794ebcb579a8e}{UDPServer} ()}
\label{classUDPServer_5f9126e71c6938ff1d0794ebcb579a8e}

\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
\hypertarget{classUDPServer_497c350fb10549c5ddbf359ecb4e5c3f}{
\hyperlink{classUDPServer_497c350fb10549c5ddbf359ecb4e5c3f}{UDPServer} (boost::uint16\_\-t port)}
\label{classUDPServer_497c350fb10549c5ddbf359ecb4e5c3f}

\begin{CompactList}\small\item\em Sets server port. \item\end{CompactList}\item 
\hypertarget{classUDPServer_33027bda84b51ae51d0625d949341da8}{
\hyperlink{classUDPServer_33027bda84b51ae51d0625d949341da8}{UDPServer} (const \hyperlink{classAddress}{Address} \&address)}
\label{classUDPServer_33027bda84b51ae51d0625d949341da8}

\begin{CompactList}\small\item\em Sets server port from specified \hyperlink{classAddress}{Address} object. \item\end{CompactList}\item 
\hypertarget{classUDPServer_09b1a38f1a03d3832f85fe05e6370a11}{
\hyperlink{classUDPServer_09b1a38f1a03d3832f85fe05e6370a11}{$\sim$UDPServer} ()}
\label{classUDPServer_09b1a38f1a03d3832f85fe05e6370a11}

\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
\hypertarget{classUDPServer_396f13b87edf5b63f416fd20829a9a15}{
boost::uint16\_\-t \hyperlink{classUDPServer_396f13b87edf5b63f416fd20829a9a15}{getPort} () const }
\label{classUDPServer_396f13b87edf5b63f416fd20829a9a15}

\begin{CompactList}\small\item\em Gets server port. \item\end{CompactList}\item 
\hypertarget{classUDPServer_52be3bf59699acdcf26dc42f8bfab3c3}{
void \hyperlink{classUDPServer_52be3bf59699acdcf26dc42f8bfab3c3}{setPort} (boost::uint16\_\-t port)}
\label{classUDPServer_52be3bf59699acdcf26dc42f8bfab3c3}

\begin{CompactList}\small\item\em Sets server port. \item\end{CompactList}\item 
\hypertarget{classUDPServer_13205c1eaae8fa9b8dcefc41ea795151}{
void \hyperlink{classUDPServer_13205c1eaae8fa9b8dcefc41ea795151}{bind} ()}
\label{classUDPServer_13205c1eaae8fa9b8dcefc41ea795151}

\begin{CompactList}\small\item\em Binds server to previously specified port. \item\end{CompactList}\item 
\hypertarget{classUDPServer_f47d9a36b2bd3161798e7bb5526b5fb7}{
void \hyperlink{classUDPServer_f47d9a36b2bd3161798e7bb5526b5fb7}{bind} (boost::uint16\_\-t port)}
\label{classUDPServer_f47d9a36b2bd3161798e7bb5526b5fb7}

\begin{CompactList}\small\item\em Binds server to specified port. \item\end{CompactList}\item 
\hypertarget{classUDPServer_441a88c1187c9945bc281af76dd726ac}{
size\_\-t \hyperlink{classUDPServer_441a88c1187c9945bc281af76dd726ac}{send} (char $\ast$src\_\-buf, size\_\-t buf\_\-len)}
\label{classUDPServer_441a88c1187c9945bc281af76dd726ac}

\begin{CompactList}\small\item\em Sends response over UDP to the requesting client. \item\end{CompactList}\item 
\hypertarget{classUDPServer_501561f4120c5f50376c58558e4adeb4}{
size\_\-t \hyperlink{classUDPServer_501561f4120c5f50376c58558e4adeb4}{send} (const size\_\-t \&size)}
\label{classUDPServer_501561f4120c5f50376c58558e4adeb4}

\begin{CompactList}\small\item\em Sends a size\_\-t type over UDP to the requesting client. \item\end{CompactList}\item 
\hypertarget{classUDPServer_120293ec02307266d09d78f6d199f966}{
size\_\-t \hyperlink{classUDPServer_120293ec02307266d09d78f6d199f966}{send} (const std::string \&str)}
\label{classUDPServer_120293ec02307266d09d78f6d199f966}

\begin{CompactList}\small\item\em Sends a string over UDP to the requesting client. \item\end{CompactList}\item 
{\footnotesize template$<$typename ConstBufferSequence$>$ }\\size\_\-t \hyperlink{classUDPServer_7da0b79c370a74c3ab94d607f7c3bfeb}{send} (const ConstBufferSequence \&buf\_\-seq)
\begin{CompactList}\small\item\em Sends a buffer over UDP to the requesting client. \item\end{CompactList}\item 
\hypertarget{classUDPServer_f419ea70dd008197494f4d023444e8fd}{
size\_\-t \hyperlink{classUDPServer_f419ea70dd008197494f4d023444e8fd}{receive} (char $\ast$dest\_\-buf, size\_\-t buf\_\-len)}
\label{classUDPServer_f419ea70dd008197494f4d023444e8fd}

\begin{CompactList}\small\item\em Receives requests over UDP from clients. \item\end{CompactList}\item 
\hypertarget{classUDPServer_836343729c91b3ba5fe248b08ee3619c}{
size\_\-t \hyperlink{classUDPServer_836343729c91b3ba5fe248b08ee3619c}{receive} (size\_\-t \&size)}
\label{classUDPServer_836343729c91b3ba5fe248b08ee3619c}

\begin{CompactList}\small\item\em Receives a size\_\-t type over UDP from clients. \item\end{CompactList}\item 
{\footnotesize template$<$typename MutableBufferSequence$>$ }\\size\_\-t \hyperlink{classUDPServer_d348371a75546bd6b7a98c4b0396bc2e}{receive} (MutableBufferSequence \&buf\_\-seq)
\begin{CompactList}\small\item\em Receives a buffer over UDP from clients. \item\end{CompactList}\item 
\hyperlink{classUDPServer_1_1Responder}{Responder} \hyperlink{classUDPServer_7081a958e36bd9535adc4ea7e38bb3fe}{receive} ()
\begin{CompactList}\small\item\em Receives data over UDP and returns responder object. \item\end{CompactList}\end{CompactItemize}
\subsection*{Classes}
\begin{CompactItemize}
\item 
class \hyperlink{classUDPServer_1_1Responder}{Responder}
\end{CompactItemize}


\subsection{Detailed Description}
UDP Server

Basic implementation of an UDP Server. First, it is required to bind the server to a specified port, either in construction step, or later with the \hyperlink{classUDPServer_13205c1eaae8fa9b8dcefc41ea795151}{bind()} method. After that, the server is ready to accept client requests, and the \hyperlink{classUDPServer_7081a958e36bd9535adc4ea7e38bb3fe}{receive()} method should be called. Response should be sent with the \hyperlink{classUDPServer_441a88c1187c9945bc281af76dd726ac}{send()} method. 

\subsection{Member Function Documentation}
\hypertarget{classUDPServer_7da0b79c370a74c3ab94d607f7c3bfeb}{
\index{UDPServer@{UDPServer}!send@{send}}
\index{send@{send}!UDPServer@{UDPServer}}
\subsubsection[send]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename ConstBufferSequence$>$ size\_\-t UDPServer::send (const ConstBufferSequence \& {\em buf\_\-seq})\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classUDPServer_7da0b79c370a74c3ab94d607f7c3bfeb}


Sends a buffer over UDP to the requesting client. 

\begin{Desc}
\item[Note:]ConstBufferSequence must abide to certain rules, see boost documentation. \end{Desc}
\hypertarget{classUDPServer_d348371a75546bd6b7a98c4b0396bc2e}{
\index{UDPServer@{UDPServer}!receive@{receive}}
\index{receive@{receive}!UDPServer@{UDPServer}}
\subsubsection[receive]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename MutableBufferSequence$>$ size\_\-t UDPServer::receive (MutableBufferSequence \& {\em buf\_\-seq})\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classUDPServer_d348371a75546bd6b7a98c4b0396bc2e}


Receives a buffer over UDP from clients. 

\begin{Desc}
\item[Note:]MutableBufferSequence must abide to certain rules, see boost documentation. \end{Desc}
\hypertarget{classUDPServer_7081a958e36bd9535adc4ea7e38bb3fe}{
\index{UDPServer@{UDPServer}!receive@{receive}}
\index{receive@{receive}!UDPServer@{UDPServer}}
\subsubsection[receive]{\setlength{\rightskip}{0pt plus 5cm}{\bf Responder} UDPServer::receive ()\hspace{0.3cm}{\tt  \mbox{[}inline\mbox{]}}}}
\label{classUDPServer_7081a958e36bd9535adc4ea7e38bb3fe}


Receives data over UDP and returns responder object. 

Use this in multi-threaded environments when the server is supposed to serve more than one client. 

The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
\hyperlink{udpserver_8cpp}{udpserver.cpp}\end{CompactItemize}
